package com.opesoft.fw.mvc.taglib;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
import javax.servlet.jsp.tagext.Tag;

import org.apache.log4j.Logger;

public abstract class FormBase extends BodyTagSupport
{
	Logger log=Logger.getLogger(this.getClass());

	public int doStartTag() throws JspException
	{
		return Tag.EVAL_BODY_INCLUDE;
	}

	public int doEndTag() throws JspException
	{
		return Tag.EVAL_PAGE;
	}

	protected void write(String html)
	{
		try
		{
			pageContext.getOut().println(html);
		}
		catch(IOException e)
		{
			e.printStackTrace();
		}
	}

	protected String htmlProprty(String name,String value)
	{
		return " "+name+"=\""+value+"\"";
	}

}
